﻿using Restbucks.Shared.Domain;
using Restbucks.Shared.Representations;

namespace Restbucks.Shared.Mappers
{
    public class ItemRepresentationMapper
    {
        public static ItemRepresentation GetRepresentation(Item item)
        {
            return new ItemRepresentation
                       {
                           Drink = item.Drink,
                           Milk = item.Milk,
                           Size = item.Size
                       };
        }

        public static Item GetDomainObject(ItemRepresentation itemRepresentation)
        {
            return new Item(itemRepresentation.Drink, itemRepresentation.Size, itemRepresentation.Milk);
        }
    }
}